package cn.task.part1;

import java.util.Scanner;

import cn.task.part1.service.impl.ReadAndCalculatesImpl;

//主程序入口
public class Main {

	private static void init() {
		System.out.println("1.显示计算的平均值");
		System.out.println("2.显示读取的文件内容");
		System.out.println("3.退出");
	}

	public static void main(String[] args) {
		while (true) {
			init();
			Scanner in = new Scanner(System.in);
			int nextInt = in.nextInt();
			ReadAndCalculatesImpl readCSV = new ReadAndCalculatesImpl();
			if (nextInt == 1) {
				readCSV.displayCountAvg();
			} else if (nextInt == 2) {
				readCSV.displayAll();
			} else if (nextInt == 3) {
				break;
			}
		}
	}
}
